<?php
	header ('Content-type: application/atom+xml');
	require_once ('Engine/anorexic.php');
	if (array_key_exists ('Id', $_GET)) {
		$Entry = new EntriesCollection (0);
		$Entry = $Entry->CreateElement (urlencode ($_GET ['Id']));
		if (! $Entry->Exists) {
			header ('HTTP/1.0 404 Not Found');
			die ('no such entry');
		}
		require_once (PREFIX.'Engine/Template/Single.xml');
	} else {
		$Entries = new EntriesCollection (Config::WINDOW);
		require_once (PREFIX.'Engine/Template/Feed.xml');
	}
?>